package cn.kgc.entity;

import java.util.Date;
import java.io.Serializable;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.*;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonFormat;

@Setter
@Getter
@AllArgsConstructor
@NoArgsConstructor
@Builder
@TableName(value = "depts")
@JsonInclude(value = JsonInclude.Include.ALWAYS)
@SuppressWarnings("all")
public class Depts extends Model<Depts> implements Serializable {

    /**
     * 部门id
     */
    @TableId(type = IdType.ASSIGN_ID)
    private String id;


    /**
     * 部门名称
     */
    @TableField(value = "dept_name")
    private String deptName;


    /**
     * 部门负责人ID
     */
    @TableField(value = "user_id")
    private Integer userId;


    /**
     * 部门负责人名称
     */
    @TableField(value = "user_name")
    private String userName;


    /**
     * 部门负责人邮箱
     */
    @TableField(value = "user_email")
    private String userEmail;


    /**
     * 创建时间
     */
    @TableField(value = "creationDate", fill = FieldFill.INSERT)
    @JsonIgnore
    private Date creationDate;


    /**
     * 修改时间
     */
    @TableField(value = "modifyDate", fill = FieldFill.UPDATE)
    @JsonIgnore
    private Date modifyDate;


    @Version
    @TableField(value = "version", fill = FieldFill.INSERT)
    private int version;


}
